Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape @-sign in job template. #426

Merged
merged 1 commit into from
Apr 9, 2020
Merged

Escape @-sign in job template. #426

merged 1 commit into from
Apr 9, 2020

Conversation

nuclearsandwich
Copy link
Member

Otherwise empy tries and fails to substitute the todays_date variable.

Follow-up to #424

Signed-off-by: Steven! Ragnarök steven@nuclearsandwich.com

Otherwise empy tries and fails to substitute the todays_date variable.

Signed-off-by: Steven! Ragnarök <steven@nuclearsandwich.com>
@nuclearsandwich
Copy link
Member Author

Example job diff

    <<<
    --- remote config
    +++ new config
    @@ -249,0 +250,3 @@
    +rem "Change dockerfile once per day to invalidate docker caches"
    +powershell "(Get-Content ${Env:DOCKERFILE}).replace('@todays_date', $(Get-Date).ToLongDateString()) | Set-Content ${Env:DOCKERFILE}"
    +
    @@ -253 +256 @@
    -set BUILD_ARGS=--build-arg WINDOWS_RELEASE_ID=%RELEASE_ID% --build-arg TODAYS_DATE="%date%"
    +set BUILD_ARGS=--build-arg WINDOWS_RELEASE_ID=%RELEASE_ID%
    >>>

@brawner
Copy link
Contributor

brawner commented Apr 9, 2020

This works, but we can also avoid using @ entirely so empy doesn't get the wrong idea (e.g. TODAYS_DATE)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants